package com.androidtest3d.math;

/**
 * Android Game Tutorial Project.
 *
 * Copyright (C) 2011  Philipp Jenke
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * Representation of a vertex.
 */
public class Vertex {

	/**
	 * Coordinates.
	 */
	private final MyVector coords = MyVector.makeVector3(0, 0, 0);

	/**
	 * Normal of the vertex.
	 */
	private final MyVector normal = MyVector.makeVector3(1, 0, 0);

	/**
	 * RGB-color of the vertex.
	 */
	private final MyVector color = MyVector.makeVector3(1, 0, 0);

	/**
	 * Constructor.
	 * 
	 * @param c
	 * @param n
	 * @param col
	 * @throws Exception
	 */
	public Vertex(final MyVector c, final MyVector n, final MyVector col)
			throws DimensionsNotMatchException {
		coords.copyFrom(c);
		normal.copyFrom(n);
		color.copyFrom(col);
	}

	/**
	 * @return the coords
	 */
	public MyVector getCoords() {
		return coords;
	}

	/**
	 * @return the normal
	 */
	public MyVector getNormal() {
		return normal;
	}

	/**
	 * @return the color
	 */
	public MyVector getColor() {
		return color;
	}
}
